#include <stdio.h>
#include <math.h>

int main()
{
    int x = 1534236469;
    if (x == 0)
        return 0;

    int num = 0;
    int y = x / 10;
    num++;
    y = abs(y);

    while (y % 10 > 0)
    {
        y /= 10;
        num++;
    }

    int reversenum = 0;
    for (int i = num; i > 0; i--)
    {
        int temp = x % 10;
        reversenum += temp * pow(10, i - 1);

        x /= 10;

        if ((reversenum > pow(2, 31) - 1) || (reversenum * 1.0 < pow(-2, 31)))
            return 0;
    }

    if ((reversenum > pow(2, 31) - 1) || (reversenum * 1.0 < pow(-2, 31)))
        return 0;

    printf("%d", reversenum);
    return 0;
    
}